package com.yhf.controller;

import com.yhf.pojo.TbUser;
import com.yhf.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class AxiosController {
    @Autowired
    UserService userService;

    @RequestMapping("show")
    @ResponseBody
    public List<TbUser> show(){
        System.out.println(123);
        List<TbUser> list = userService.list();
        System.out.println(list);
        return list;
    }
}
